/*
*       A simple 2D game map editor
*
*       This library is free software; you can redistribute it and/or
*       modify it under the terms of the GNU Lesser General Public
*       License as published by the Free Software Foundation; either
*       version 2.1 of the License, or (at your option) any later version.
*/
// Name        : com_def
// File        : com_def.h
// Description : common definition
// Author      : hoha
// Date        : 02/08/2009
// Evolutions  : 02/08/2009, Version V0, Creation
#ifndef COM_DEF_H
#define COM_DEF_H
//INCLUDE
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <QImage>
#include <QPixmap>
#include <QMessageBox>
#include <QInputDialog>
#include <QFile>
#include <QDir>

//CONTENT

//Base types
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

//NS
#define COM_U8_NS 0xFF
#define COM_U16_NS 0xFFFF
#define COM_U32_NS 0xFFFFFFFF
#define COM_U64_NS 0xFFFFFFFFFFFFFFFF

//unvalid tile id
#define TILE_U16_NS 0xFFFF
//is modified
extern bool is_modified;
extern int locked_tile;


//Warning and error
#define COM_MSBOX_WARNING(MSG) QMessageBox::warning(this, "warning", MSG, QMessageBox::Ok, QMessageBox::Ok)
#define COM_MSBOX_CRITICAL(MSG) QMessageBox::critical(this, "critical", MSG, QMessageBox::Ok, QMessageBox::Ok)

#endif // COM_DEF_H
